public class Demo_Extends {
    public static void main(String[] args) {
        Cat cat = new Cat();
        cat.leg = 4;
        cat.color = "White";
        cat.eat();
        cat.maiMeng();


    }
}

class Animal {
    String color;
    int leg;

    public void eat() {

        System.out.println("吃东西");
    }


}

class Cat extends Animal {
    public void maiMeng() {
        System.out.println("卖萌");
    }
}
